home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form Form1 Caption = "Hide/Show Taskbar" ClientHeight = 720 ClientLeft = 2610 ClientTop = 3480 ClientWidth = 4125 Height = 1125 Left = 2550 LinkTopic = "Form1" ScaleHeight = 720 ScaleWidth = 4125 Top = 3135 Width = 4245 Begin VB.CommandButton Command3 Caption = "Close" Height = 495 Left = 2760 TabIndex = 2 Top = 120 Width = 1215 End Begin VB.CommandButton Command2 Caption = "Show" Height = 495 Left = 1440 TabIndex = 1 Top = 120 Width = 1215 End Begin VB.CommandButton Command1 Caption = "Hide" Height = 495 Left = 120 TabIndex = 0 Top = 120 Width = 1215 End Attribute VB_Name = "Form1" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Dim hwnd1 As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Const SWP_HIDEWINDOW = &H80 Const SWP_SHOWWINDOW = &H40 Private Sub Command1_Click() hwnd1 = FindWindow("Shell_traywnd", "") Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW) End Sub Private Sub Command2_Click() Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW) End Sub Private Sub Command3_Click() Set Form1 = Nothing End End Sub